#### Generate Figure: Income by Agreement (Scatterplot) ####

fig4_dat = bind_rows(import(here("data","fig4_inc_agree_dat.rds")) |> 
                       mutate(agree = "Agree"),
                     import(here("data","fig4_inc_disagree_dat.rds")) |> 
                       mutate(agree = "Disagree")) |> 
  invert_group()

fig_inc_agree_scat = amce_scatterplot(fig4_dat, "Income", "blue", -0.03, .45, "Agree")
fig_inc_disagree_scat = amce_scatterplot(fig4_dat, "Income", "blue", -0.03, .45, "Disagree")

fig_inc_scat = fig_inc_agree_scat + fig_inc_disagree_scat

print(fig_inc_scat)

ggsave(here("figures","figure_5.png"), fig_inc_scat,
       dpi = 600, units = "in", width = 10, height = 5)

ccat("See 'figure_5.png' for Figure 5 output")

